package com.ecommerce.web.validator;

import org.springframework.validation.Errors;
import org.springframework.validation.Validator;

import com.ecommerce.dal.entity.Category;

public class CategoryValidator implements Validator {
	@Override
	public boolean supports(Class<?> clazz) {
		// just validates the Category instances
		return Category.class.isAssignableFrom(clazz);
	}

	@Override
	public void validate(Object target, Errors errors) {
//		ValidationUtils.rejectIfEmptyOrWhitespace(errors, "userName", "LoginAdmin.required.userName");
//		ValidationUtils.rejectIfEmptyOrWhitespace(errors, "password", "LoginAdmin.required.password");
	}
}
